<form method="post" id="template_add_form" action="/manager.php?app=file&act=template_edit">
	<div class="form_item">
		<strong>页面类型：</strong>
		<div>
			<select name="type">
				!{foreach from=$types item=t key=tid}
				<option value="!{$tid}">!{$t.name}</option>
				!{/foreach}
			</select>
		</div>
	</div>
	<div class="form_item">
		<strong>客户端类型：</strong>
		<div>
			<select name="agent">
				!{html_options options=$agents}
			</select>
		</div>
	</div>
	<div class="form_item">
		<strong>页面备注：</strong>
		<div><input class="text_input" maxlength="50" type="text" name="desc"/></div>
		<p>(长度应该在50以内)</p>
	</div>
	<div class="form_item form_btn_item">
		<input class="button submit_btn" type="button" value="创建" />
	</div>
</form>
<script>
	$(function(){
		$("#template_add_form").ajax_form({
			'submit_btn' : '.submit_btn'
		});
		$("#template_add_form .button").button();
	});
</script>